//
//  CHIPClustersTests.m
//  CHIPClustersTests
/*
 *
 *    Copyright (c) 2021 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP

// module headers
#import <CHIP/CHIP.h>

// system dependencies
#import <XCTest/XCTest.h>

const uint16_t kPairingTimeoutInSeconds = 10;
const uint16_t kTimeoutInSeconds = 3;
const uint64_t kDeviceId = 1;
const uint16_t kDiscriminator = 3840;
const uint32_t kSetupPINCode = 20202021;
const uint16_t kRemotePort = 5540;
const uint16_t kLocalPort = 5541;
NSString * kAddress = @"::1";

CHIPDevice * GetPairedDevice(uint64_t deviceId)
{
    CHIPDeviceController * controller = [CHIPDeviceController sharedController];
    XCTAssertNotNil(controller);

    NSError * pairingError;
    CHIPDevice * device = [controller getPairedDevice:deviceId error:&pairingError];
    XCTAssertEqual(pairingError.code, 0);
    XCTAssertNotNil(device);

    return device;
}

@interface CHIPToolPairingDelegate : NSObject <CHIPDevicePairingDelegate>
@property (nonatomic, strong) XCTestExpectation * expectation;
@end

@implementation CHIPToolPairingDelegate
- (id)initWithExpectation:(XCTestExpectation *)expectation
{
    self = [super init];
    if (self) {
        _expectation = expectation;
    }
    return self;
}

- (void)onPairingComplete:(NSError *)error
{
    XCTAssertEqual(error.code, 0);
    [_expectation fulfill];
    _expectation = nil;
}
@end

@interface CHIPClustersTests : XCTestCase
@end

@implementation CHIPClustersTests

- (void)setUp
{
    [super setUp];
    [self setContinueAfterFailure:NO];
}

- (void)testInitStack
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"];

    CHIPDeviceController * controller = [CHIPDeviceController sharedController];
    XCTAssertNotNil(controller);

    CHIPToolPairingDelegate * pairing = [[CHIPToolPairingDelegate alloc] initWithExpectation:expectation];
    dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL);

    [controller setListenPort:kLocalPort];
    [controller setPairingDelegate:pairing queue:callbackQueue];

    BOOL started = [controller startup:nil];
    XCTAssertTrue(started);

    NSError * error;
    [controller pairDevice:kDeviceId
                   address:kAddress
                      port:kRemotePort
             discriminator:kDiscriminator
              setupPINCode:kSetupPINCode
                     error:&error];
    XCTAssertEqual(error.code, 0);

    [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil];
}

- (void)testShutdownStack
{
    CHIPDeviceController * controller = [CHIPDeviceController sharedController];
    XCTAssertNotNil(controller);

    NSError * error;
    [controller unpairDevice:kDeviceId error:&error];
    XCTAssertEqual(error.code, 0);

    BOOL stopped = [controller shutdown];
    XCTAssertTrue(stopped);
}

- (void)testReuseChipClusterObject
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseCHIPClusterObjectFirstCall"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster test:^(NSError * err, NSDictionary * values) {
        NSLog(@"ReuseCHIPClusterObject test Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];

    expectation = [self expectationWithDescription:@"ReuseCHIPClusterObjectSecondCall"];

    // Reuse the CHIPCluster Object for multiple times.

    [cluster test:^(NSError * err, NSDictionary * values) {
        NSLog(@"ReuseCHIPClusterObject test Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTestCluster_000000_Test
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster test:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Test Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000001_TestNotHandled
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Not Handled Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster testNotHandled:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Test Not Handled Command Error: %@", err);

        XCTAssertEqual(err.code, 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000002_TestSpecific
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Specific Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster testSpecific:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Test Specific Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"returnValue"] unsignedCharValue], 7);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000004_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BOOLEAN True"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t booleanArgument = 1;
    [cluster writeAttributeBooleanWithValue:booleanArgument
                            responseHandler:^(NSError * err, NSDictionary * values) {
                                NSLog(@"Write attribute BOOLEAN True Error: %@", err);

                                XCTAssertEqual(err.code, 0);
                                [expectation fulfill];
                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000005_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN True"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BOOLEAN True Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000006_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BOOLEAN False"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t booleanArgument = 0;
    [cluster writeAttributeBooleanWithValue:booleanArgument
                            responseHandler:^(NSError * err, NSDictionary * values) {
                                NSLog(@"Write attribute BOOLEAN False Error: %@", err);

                                XCTAssertEqual(err.code, 0);
                                [expectation fulfill];
                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000007_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN False"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BOOLEAN False Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000008_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000009_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP8 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t bitmap8Argument = 255;
    [cluster writeAttributeBitmap8WithValue:bitmap8Argument
                            responseHandler:^(NSError * err, NSDictionary * values) {
                                NSLog(@"Write attribute BITMAP8 Max Value Error: %@", err);

                                XCTAssertEqual(err.code, 0);
                                [expectation fulfill];
                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000010_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP8 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 255);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000011_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP8 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t bitmap8Argument = 0;
    [cluster writeAttributeBitmap8WithValue:bitmap8Argument
                            responseHandler:^(NSError * err, NSDictionary * values) {
                                NSLog(@"Write attribute BITMAP8 Min Value Error: %@", err);

                                XCTAssertEqual(err.code, 0);
                                [expectation fulfill];
                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000012_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP8 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000013_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000014_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP16 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t bitmap16Argument = 65535U;
    [cluster writeAttributeBitmap16WithValue:bitmap16Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP16 Max Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000015_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP16 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 65535);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000016_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP16 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t bitmap16Argument = 0U;
    [cluster writeAttributeBitmap16WithValue:bitmap16Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP16 Min Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000017_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP16 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000018_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000019_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP32 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint32_t bitmap32Argument = 4294967295UL;
    [cluster writeAttributeBitmap32WithValue:bitmap32Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP32 Max Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000020_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP32 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 4294967295);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000021_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP32 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint32_t bitmap32Argument = 0UL;
    [cluster writeAttributeBitmap32WithValue:bitmap32Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP32 Min Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000022_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP32 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000023_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000024_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP64 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint64_t bitmap64Argument = 18446744073709551615ULL;
    [cluster writeAttributeBitmap64WithValue:bitmap64Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP64 Max Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000025_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP64 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 18446744073709551615);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000026_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP64 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint64_t bitmap64Argument = 0ULL;
    [cluster writeAttributeBitmap64WithValue:bitmap64Argument
                             responseHandler:^(NSError * err, NSDictionary * values) {
                                 NSLog(@"Write attribute BITMAP64 Min Value Error: %@", err);

                                 XCTAssertEqual(err.code, 0);
                                 [expectation fulfill];
                             }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000027_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute BITMAP64 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000028_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8U Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000029_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t int8uArgument = 255;
    [cluster writeAttributeInt8uWithValue:int8uArgument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute INT8U Max Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000030_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8U Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 255);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000031_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t int8uArgument = 0;
    [cluster writeAttributeInt8uWithValue:int8uArgument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute INT8U Min Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000032_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8U Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000033_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16U Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000034_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t int16uArgument = 65535U;
    [cluster writeAttributeInt16uWithValue:int16uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT16U Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000035_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16U Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 65535);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000036_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t int16uArgument = 0U;
    [cluster writeAttributeInt16uWithValue:int16uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT16U Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000037_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16U Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000038_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32U Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000039_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint32_t int32uArgument = 4294967295UL;
    [cluster writeAttributeInt32uWithValue:int32uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT32U Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000040_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32U Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 4294967295);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000041_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint32_t int32uArgument = 0UL;
    [cluster writeAttributeInt32uWithValue:int32uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT32U Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000042_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32U Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000043_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64U Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000044_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint64_t int64uArgument = 18446744073709551615ULL;
    [cluster writeAttributeInt64uWithValue:int64uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT64U Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000045_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64U Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 18446744073709551615);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000046_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint64_t int64uArgument = 0ULL;
    [cluster writeAttributeInt64uWithValue:int64uArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT64U Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000047_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64U Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000048_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] charValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000049_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int8_t int8sArgument = 127;
    [cluster writeAttributeInt8sWithValue:int8sArgument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute INT8S Max Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000050_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8S Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] charValue], 127);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000051_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int8_t int8sArgument = -128;
    [cluster writeAttributeInt8sWithValue:int8sArgument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute INT8S Min Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000052_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8S Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] charValue], -128);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000053_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int8_t int8sArgument = 0;
    [cluster writeAttributeInt8sWithValue:int8sArgument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute INT8S Default Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000054_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT8S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] charValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000055_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] shortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000056_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int16_t int16sArgument = 32767;
    [cluster writeAttributeInt16sWithValue:int16sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT16S Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000057_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16S Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] shortValue], 32767);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000058_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int16_t int16sArgument = -32768;
    [cluster writeAttributeInt16sWithValue:int16sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT16S Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000059_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16S Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] shortValue], -32768);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000060_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int16_t int16sArgument = 0;
    [cluster writeAttributeInt16sWithValue:int16sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT16S Default Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000061_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT16S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] shortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000062_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000063_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int32_t int32sArgument = 2147483647L;
    [cluster writeAttributeInt32sWithValue:int32sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT32S Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000064_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32S Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longValue], 2147483647);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000065_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int32_t int32sArgument = -2147483648L;
    [cluster writeAttributeInt32sWithValue:int32sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT32S Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000066_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32S Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longValue], -2147483648);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000067_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int32_t int32sArgument = 0L;
    [cluster writeAttributeInt32sWithValue:int32sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT32S Default Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000068_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT32S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000069_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000070_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int64_t int64sArgument = 9223372036854775807LL;
    [cluster writeAttributeInt64sWithValue:int64sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT64S Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000071_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64S Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longLongValue], 9223372036854775807);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000072_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int64_t int64sArgument = -9223372036854775807LL;
    [cluster writeAttributeInt64sWithValue:int64sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT64S Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000073_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64S Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longLongValue], -9223372036854775807);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000074_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int64_t int64sArgument = 0LL;
    [cluster writeAttributeInt64sWithValue:int64sArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute INT64S Default Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000075_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute INT64S Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] longLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000076_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM8 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000077_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM8 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t enum8Argument = 255;
    [cluster writeAttributeEnum8WithValue:enum8Argument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute ENUM8 Max Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000078_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM8 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 255);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000079_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM8 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t enum8Argument = 0;
    [cluster writeAttributeEnum8WithValue:enum8Argument
                          responseHandler:^(NSError * err, NSDictionary * values) {
                              NSLog(@"Write attribute ENUM8 Min Value Error: %@", err);

                              XCTAssertEqual(err.code, 0);
                              [expectation fulfill];
                          }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000080_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM8 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000081_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM16 Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000082_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM16 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t enum16Argument = 65535U;
    [cluster writeAttributeEnum16WithValue:enum16Argument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute ENUM16 Max Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000083_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Max Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM16 Max Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 65535);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000084_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM16 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t enum16Argument = 0U;
    [cluster writeAttributeEnum16WithValue:enum16Argument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"Write attribute ENUM16 Min Value Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000085_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Min Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute ENUM16 Min Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000086_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute OCTET_STRING Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * octetStringArgumentString = @"";
        NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
        XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000087_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * octetStringArgumentString = @"TestValue";
    NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
    [cluster writeAttributeOctetStringWithValue:octetStringArgument
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"Write attribute OCTET_STRING Error: %@", err);

                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000088_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute OCTET_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * octetStringArgumentString = @"TestValue";
        NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
        XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000089_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * octetStringArgumentString = @"TestValueLongerThan10";
    NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
    [cluster writeAttributeOctetStringWithValue:octetStringArgument
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"Write attribute OCTET_STRING Error: %@", err);

                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000090_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute OCTET_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * octetStringArgumentString = @"TestValue";
        NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
        XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000091_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * octetStringArgumentString = @"";
    NSData * octetStringArgument = [octetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
    [cluster writeAttributeOctetStringWithValue:octetStringArgument
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"Write attribute OCTET_STRING Error: %@", err);

                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000092_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_OCTET_STRING Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLongOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LONG_OCTET_STRING Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * longOctetStringArgumentString = @"";
        NSData * longOctetStringArgument = [longOctetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
        XCTAssertTrue([values[@"value"] isEqualToData:longOctetStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000093_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * longOctetStringArgumentString
        = @"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
          @"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
          @"11111111111111111111111111111111111111111111111111111111111111";
    NSData * longOctetStringArgument = [longOctetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
    [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument
                                    responseHandler:^(NSError * err, NSDictionary * values) {
                                        NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err);

                                        XCTAssertEqual(err.code, 0);
                                        [expectation fulfill];
                                    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000094_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLongOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LONG_OCTET_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * longOctetStringArgumentString
            = @"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
              @"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
              @"1111111111111111111111111111111111111111111111111111111111111111111111";
        NSData * longOctetStringArgument = [longOctetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
        XCTAssertTrue([values[@"value"] isEqualToData:longOctetStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000095_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * longOctetStringArgumentString = @"";
    NSData * longOctetStringArgument = [longOctetStringArgumentString dataUsingEncoding:NSUTF8StringEncoding];
    [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument
                                    responseHandler:^(NSError * err, NSDictionary * values) {
                                        NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err);

                                        XCTAssertEqual(err.code, 0);
                                        [expectation fulfill];
                                    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000096_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute CHAR_STRING Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * charStringArgument = @"";
        XCTAssertTrue([values[@"value"] isEqualToString:charStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000097_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * charStringArgument = @"☉Test☉";
    [cluster writeAttributeCharStringWithValue:charStringArgument
                               responseHandler:^(NSError * err, NSDictionary * values) {
                                   NSLog(@"Write attribute CHAR_STRING Error: %@", err);

                                   XCTAssertEqual(err.code, 0);
                                   [expectation fulfill];
                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000098_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * charStringArgument = @"☉TestValueLongerThan10☉";
    [cluster writeAttributeCharStringWithValue:charStringArgument
                               responseHandler:^(NSError * err, NSDictionary * values) {
                                   NSLog(@"Write attribute CHAR_STRING Error: %@", err);

                                   XCTAssertEqual(err.code, 0);
                                   [expectation fulfill];
                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000099_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * charStringArgument = @"";
    [cluster writeAttributeCharStringWithValue:charStringArgument
                               responseHandler:^(NSError * err, NSDictionary * values) {
                                   NSLog(@"Write attribute CHAR_STRING Error: %@", err);

                                   XCTAssertEqual(err.code, 0);
                                   [expectation fulfill];
                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000100_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_CHAR_STRING Default Value"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLongCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LONG_CHAR_STRING Default Value Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * longCharStringArgument = @"";
        XCTAssertTrue([values[@"value"] isEqualToString:longCharStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000101_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * longCharStringArgument
        = @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"
          @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"
          @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉";
    [cluster writeAttributeLongCharStringWithValue:longCharStringArgument
                                   responseHandler:^(NSError * err, NSDictionary * values) {
                                       NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err);

                                       XCTAssertEqual(err.code, 0);
                                       [expectation fulfill];
                                   }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000102_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLongCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LONG_CHAR_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        NSString * longCharStringArgument
            = @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"
              @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"
              @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉";
        XCTAssertTrue([values[@"value"] isEqualToString:longCharStringArgument]);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000103_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_CHAR_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * longCharStringArgument = @"";
    [cluster writeAttributeLongCharStringWithValue:longCharStringArgument
                                   responseHandler:^(NSError * err, NSDictionary * values) {
                                       NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err);

                                       XCTAssertEqual(err.code, 0);
                                       [expectation fulfill];
                                   }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000104_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeListInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LIST Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] count], 4);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000105_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST_OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeListOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LIST_OCTET_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] count], 4);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000106_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST_STRUCT_OCTET_STRING"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeListStructOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute LIST_STRUCT_OCTET_STRING Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] count], 4);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000107_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute UNSUPPORTED"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeUnsupportedWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Read attribute UNSUPPORTED Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000108_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Writeattribute UNSUPPORTED"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t unsupportedArgument = 0;
    [cluster writeAttributeUnsupportedWithValue:unsupportedArgument
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"Writeattribute UNSUPPORTED Error: %@", err);

                                    if (err.code == CHIPErrorCodeUnsupportedAttribute) {
                                        [expectation fulfill];
                                        return;
                                    }

                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTestCluster_000109_Test
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command to unsupported endpoint"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:200 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster test:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Test Command to unsupported endpoint Error: %@", err);

        XCTAssertEqual(err.code, 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_OO_1_1_000000_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the global attribute: ClusterRevision Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_1_1_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back global attribute: ClusterRevision Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_1_1_000002_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the optional global attribute: FeatureMap Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_1_1_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back optional global attribute: FeatureMap"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back optional global attribute: FeatureMap Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedLongValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_OO_2_1_000000_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: OnOff"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the mandatory attribute: OnOff Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back mandatory attribute: OnOff"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back mandatory attribute: OnOff Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000002_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: GlobalSceneControl"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeGlobalSceneControlWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read LT attribute: GlobalSceneControl Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OnTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read LT attribute: OnTime Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OffWaitTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOffWaitTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read LT attribute: OffWaitTime Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: StartUpOnOff"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStartUpOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read LT attribute: StartUpOnOff Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000006_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OnTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t onTimeArgument = 0U;
    [cluster writeAttributeOnTimeWithValue:onTimeArgument
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"write the default value to LT attribute: OnTime Error: %@", err);

                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000007_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OffWaitTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t offWaitTimeArgument = 0U;
    [cluster writeAttributeOffWaitTimeWithValue:offWaitTimeArgument
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"write the default value to LT attribute: OffWaitTime Error: %@", err);

                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000008_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: StartUpOnOff"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t startUpOnOffArgument = 0;
    [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"write the default value to LT attribute: StartUpOnOff Error: %@", err);

                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000009_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OnTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back LT attribute: OnTime Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000010_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OffWaitTime"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOffWaitTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back LT attribute: OffWaitTime Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_1_000011_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: StartUpOnOff"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStartUpOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back LT attribute: StartUpOnOff Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_OO_2_2_000000_Off
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster off:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Off Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is false after off command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000002_On
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send On Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster on:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send On Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is true after on command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000004_Off
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster off:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Off Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000005_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is false after off command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000006_Toggle
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Toggle Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster toggle:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Toggle Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000007_ReadAttribute
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"Check on/off attribute value is true after toggle command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is true after toggle command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000008_Toggle
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Toggle Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster toggle:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Toggle Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000009_ReadAttribute
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"Check on/off attribute value is false after toggle command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is false after toggle command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000010_On
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send On Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster on:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send On Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000011_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is true after on command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 1);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000012_Off
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster off:^(NSError * err, NSDictionary * values) {
        NSLog(@"Send Off Command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_OO_2_2_000013_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Check on/off attribute value is false after off command Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_DM_1_1_000000_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query Interaction Model Version"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInteractionModelVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query Interaction Model Version Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query Vendor Name"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query Vendor Name Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 32);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000002_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query VendorID"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query VendorID Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query Product Name"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query Product Name Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 32);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000004_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductID"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductIDWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query ProductID Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000005_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query User Label"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query User Label Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 32);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000006_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query User Location"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLocationWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query User Location Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 2);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000007_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query HardwareVersion"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query HardwareVersion Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000008_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query HardwareVersionString"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query HardwareVersionString Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertGreaterThanOrEqual([values[@"value"] length], 1);
        XCTAssertLessThanOrEqual([values[@"value"] length], 64);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000009_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query SoftwareVersion"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query SoftwareVersion Error: %@", err);

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000010_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query SoftwareVersionString"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query SoftwareVersionString Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertGreaterThanOrEqual([values[@"value"] length], 1);
        XCTAssertLessThanOrEqual([values[@"value"] length], 64);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000011_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query ManufacturingDate"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query ManufacturingDate Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertGreaterThanOrEqual([values[@"value"] length], 8);
        XCTAssertLessThanOrEqual([values[@"value"] length], 16);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000012_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query PartNumber"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query PartNumber Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 32);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000013_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductURL"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query ProductURL Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 256);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000014_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductLabel"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query ProductLabel Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 64);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000015_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query SerialNumber"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query SerialNumber Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        XCTAssertLessThanOrEqual([values[@"value"] length], 32);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000016_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query LocalConfigDisabled"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLocalConfigDisabledWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query LocalConfigDisabled Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_DM_1_1_000017_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"Query Reachable"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Query Reachable Error: %@", err);

        if (err.code == CHIPErrorCodeUnsupportedAttribute) {
            [expectation fulfill];
            return;
        }

        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_WNCV_1_1_000000_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the global attribute: ClusterRevision Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_1_1_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back global attribute: ClusterRevision Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedShortValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTest_TC_WNCV_2_1_000000_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: Type"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the RO mandatory attribute default: Type Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000001_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: Type"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back the RO mandatory attribute: Type Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000002_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: ConfigStatus"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeConfigStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the RO mandatory attribute default: ConfigStatus Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000003_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: ConfigStatus"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeConfigStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back the RO mandatory attribute: ConfigStatus Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 3);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000004_ReadAttribute
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"read the RO mandatory attribute default: OperationalStatus"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOperationalStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the RO mandatory attribute default: OperationalStatus Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000005_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: OperationalStatus"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOperationalStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back the RO mandatory attribute: OperationalStatus Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000006_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: EndProductType"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEndProductTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the RO mandatory attribute default: EndProductType Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000007_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: EndProductType"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEndProductTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back the RO mandatory attribute: EndProductType Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000008_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"read the RW mandatory attribute default: Mode"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"read the RW mandatory attribute default: Mode Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000009_WriteAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"write a value into the RW mandatory attribute:: Mode"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t modeArgument = 7;
    [cluster writeAttributeModeWithValue:modeArgument
                         responseHandler:^(NSError * err, NSDictionary * values) {
                             NSLog(@"write a value into the RW mandatory attribute:: Mode Error: %@", err);

                             XCTAssertEqual(err.code, 0);
                             [expectation fulfill];
                         }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterTest_TC_WNCV_2_1_000010_ReadAttribute
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RW mandatory attribute: Mode"];
    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"reads back the RW mandatory attribute: Mode Error: %@", err);

        XCTAssertEqual(err.code, 0);
        XCTAssertEqual([values[@"value"] unsignedCharValue], 7);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterAccountLoginReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"AccountLoginReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPAccountLogin * cluster = [[CHIPAccountLogin alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"AccountLogin ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeVendorNameWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorNameWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic VendorName Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeVendorIdWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic VendorId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeApplicationNameWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationNameWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeApplicationNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic ApplicationName Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeProductIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeProductIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic ProductId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeApplicationIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic ApplicationId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic CatalogVendorId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationStatusWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeApplicationStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic ApplicationStatus Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationBasicReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationBasicReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationBasic ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeApplicationLauncherListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationLauncher ApplicationLauncherList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationLauncher CatalogVendorId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationLauncher ApplicationId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterApplicationLauncherReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ApplicationLauncherReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ApplicationLauncher ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterAudioOutputReadAttributeAudioOutputListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"AudioOutputReadAttributeAudioOutputListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeAudioOutputListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"AudioOutput AudioOutputList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterAudioOutputReadAttributeCurrentAudioOutputWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"AudioOutputReadAttributeCurrentAudioOutputWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentAudioOutputWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"AudioOutput CurrentAudioOutput Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterAudioOutputReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"AudioOutputReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"AudioOutput ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBarrierControlReadAttributeBarrierMovingStateWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BarrierControlReadAttributeBarrierMovingStateWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBarrierMovingStateWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BarrierControl BarrierMovingState Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBarrierSafetyStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BarrierControl BarrierSafetyStatus Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBarrierCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BarrierControl BarrierCapabilities Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBarrierControlReadAttributeBarrierPositionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BarrierControlReadAttributeBarrierPositionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBarrierPositionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BarrierControl BarrierPosition Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBarrierControlReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BarrierControlReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BarrierControl ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBinaryInputBasicReadAttributeOutOfServiceWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BinaryInputBasicReadAttributeOutOfServiceWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOutOfServiceWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BinaryInputBasic OutOfService Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBinaryInputBasicWriteAttributeOutOfServiceWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributeOutOfServiceWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeOutOfServiceWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"BinaryInputBasic OutOfService Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterBinaryInputBasicReadAttributePresentValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BinaryInputBasicReadAttributePresentValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePresentValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BinaryInputBasic PresentValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBinaryInputBasicWriteAttributePresentValueWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributePresentValueWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0;
    [cluster writeAttributePresentValueWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"BinaryInputBasic PresentValue Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterBinaryInputBasicReadAttributeStatusFlagsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BinaryInputBasicReadAttributeStatusFlagsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BinaryInputBasic StatusFlags Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BinaryInputBasicReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BinaryInputBasic ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBindingReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"BindingReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Binding ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorNameWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic VendorName Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorIDWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic VendorID Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductNameWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic ProductName Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeUserLabelWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeUserLabelWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicWriteAttributeUserLabelWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedDeviceBasicWriteAttributeUserLabelWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    NSString * value = @"Test";
    [cluster writeAttributeUserLabelWithValue:value
                              responseHandler:^(NSError * err, NSDictionary * values) {
                                  NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err);
                                  XCTAssertEqual(err.code, 0);
                                  [expectation fulfill];
                              }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic HardwareVersion Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic HardwareVersionString Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic SoftwareVersion Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic SoftwareVersionString Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic ManufacturingDate Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributePartNumberWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic PartNumber Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductURLWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic ProductURL Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductLabelWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic ProductLabel Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic SerialNumber Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeReachableWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic Reachable Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"BridgedDeviceBasic ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCurrentHueWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentHueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CurrentHue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCurrentSaturationWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeCurrentSaturationWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentSaturationWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CurrentSaturation Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeRemainingTimeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeRemainingTimeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl RemainingTime Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCurrentXWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentXWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentXWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CurrentX Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCurrentYWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentYWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentYWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CurrentY Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeDriftCompensationWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeDriftCompensationWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeDriftCompensationWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl DriftCompensation Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCompensationTextWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeCompensationTextWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCompensationTextWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CompensationText Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorTemperatureWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorTemperatureWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorTemperatureWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorTemperature Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorModeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorControlOptionsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorControlOptionsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorControlOptionsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorControlOptions Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorControlOptionsWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorControlOptionsWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeColorControlOptionsWithValue:value
                                        responseHandler:^(NSError * err, NSDictionary * values) {
                                            NSLog(@"ColorControl ColorControlOptions Error: %@", err);
                                            XCTAssertEqual(err.code, 0);
                                            [expectation fulfill];
                                        }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeNumberOfPrimariesWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeNumberOfPrimariesWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNumberOfPrimariesWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl NumberOfPrimaries Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary1XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary1XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary1X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary1YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary1YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary1Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary1IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary1IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary1IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary1Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary2XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary2XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary2X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary2YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary2YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary2Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary2IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary2IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary2IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary2Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary3XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary3XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary3X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary3YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary3YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary3Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary3IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary3IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary3IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary3Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary4XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary4XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary4X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary4YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary4YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary4Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary4IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary4IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary4IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary4Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary5XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary5XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary5X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary5YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary5YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary5Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary5IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary5IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary5IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary5Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary6XWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6XWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary6XWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary6X Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary6YWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6YWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary6YWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary6Y Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributePrimary6IntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributePrimary6IntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePrimary6IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl Primary6Intensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeWhitePointXWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointXWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeWhitePointXWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl WhitePointX Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeWhitePointXWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointXWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeWhitePointXWithValue:value
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"ColorControl WhitePointX Error: %@", err);
                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeWhitePointYWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointYWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeWhitePointYWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl WhitePointY Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeWhitePointYWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointYWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeWhitePointYWithValue:value
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"ColorControl WhitePointY Error: %@", err);
                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointRXWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRXWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointRXWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointRX Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointRXWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRXWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointRXWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointRX Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointRYWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRYWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointRYWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointRY Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointRYWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRYWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointRYWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointRY Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointRIntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorPointRIntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointRIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointRIntensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointRIntensityWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRIntensityWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeColorPointRIntensityWithValue:value
                                         responseHandler:^(NSError * err, NSDictionary * values) {
                                             NSLog(@"ColorControl ColorPointRIntensity Error: %@", err);
                                             XCTAssertEqual(err.code, 0);
                                             [expectation fulfill];
                                         }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointGXWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGXWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointGXWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointGX Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointGXWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGXWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointGXWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointGX Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointGYWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGYWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointGYWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointGY Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointGYWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGYWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointGYWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointGY Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointGIntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorPointGIntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointGIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointGIntensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointGIntensityWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGIntensityWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeColorPointGIntensityWithValue:value
                                         responseHandler:^(NSError * err, NSDictionary * values) {
                                             NSLog(@"ColorControl ColorPointGIntensity Error: %@", err);
                                             XCTAssertEqual(err.code, 0);
                                             [expectation fulfill];
                                         }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointBXWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBXWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointBXWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointBX Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointBXWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBXWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointBXWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointBX Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointBYWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBYWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointBYWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointBY Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointBYWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBYWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeColorPointBYWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"ColorControl ColorPointBY Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeColorPointBIntensityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorPointBIntensityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorPointBIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorPointBIntensity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeColorPointBIntensityWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBIntensityWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeColorPointBIntensityWithValue:value
                                         responseHandler:^(NSError * err, NSDictionary * values) {
                                             NSLog(@"ColorControl ColorPointBIntensity Error: %@", err);
                                             XCTAssertEqual(err.code, 0);
                                             [expectation fulfill];
                                         }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeEnhancedCurrentHueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeEnhancedCurrentHueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnhancedCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl EnhancedCurrentHue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeEnhancedColorModeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeEnhancedColorModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEnhancedColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl EnhancedColorMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorLoopActiveWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorLoopActiveWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorLoopActive Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorLoopDirectionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorLoopDirectionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorLoopDirection Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorLoopTimeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorLoopTimeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorLoopTime Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorCapabilitiesWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorCapabilitiesWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorCapabilities Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMinWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMinWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorTempPhysicalMinWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorTempPhysicalMin Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeColorTempPhysicalMaxWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ColorTempPhysicalMax Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl CoupleColorTempToLevelMinMireds Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStartUpColorTemperatureMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value
                                                  responseHandler:^(NSError * err, NSDictionary * values) {
                                                      NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err);
                                                      XCTAssertEqual(err.code, 0);
                                                      [expectation fulfill];
                                                  }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterColorControlReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ColorControlReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ColorControl ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeAcceptsHeaderListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ContentLauncher AcceptsHeaderList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSupportedStreamingTypesWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ContentLauncher SupportedStreamingTypes Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterContentLauncherReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ContentLauncherReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ContentLauncher ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDescriptorReadAttributeDeviceListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeDeviceListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeDeviceListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Descriptor DeviceList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDescriptorReadAttributeServerListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeServerListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeServerListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Descriptor ServerList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDescriptorReadAttributeClientListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeClientListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClientListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Descriptor ClientList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDescriptorReadAttributePartsListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributePartsListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePartsListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Descriptor PartsList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDescriptorReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"DescriptorReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Descriptor ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDoorLockReadAttributeLockStateWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockStateWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLockStateWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"DoorLock LockState Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDoorLockReadAttributeLockTypeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLockTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"DoorLock LockType Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeActuatorEnabledWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeActuatorEnabledWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"DoorLock ActuatorEnabled Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterDoorLockReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"DoorLock ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeasurementTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement MeasurementType Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTotalActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement TotalActivePower Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsVoltageWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsVoltage Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsVoltageMinWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsVoltageMin Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsVoltageMaxWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsVoltageMax Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsCurrentWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsCurrent Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsCurrentMinWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsCurrentMin Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRmsCurrentMaxWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement RmsCurrentMax Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement ActivePower Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeActivePowerMinWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement ActivePowerMin Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeActivePowerMaxWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement ActivePowerMax Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ElectricalMeasurement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePacketRxCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics PacketRxCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePacketTxCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics PacketTxCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxErrCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics TxErrCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCollisionCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics CollisionCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOverrunCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics OverrunCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device
                                                                                             endpoint:0
                                                                                                queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"EthernetNetworkDiagnostics ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFixedLabelReadAttributeLabelListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"FixedLabelReadAttributeLabelListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLabelListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FixedLabel LabelList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"FixedLabelReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FixedLabel ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFlowMeasurementReadAttributeMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"FlowMeasurementReadAttributeMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FlowMeasurement MeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"FlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FlowMeasurement MinMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"FlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FlowMeasurement MaxMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterFlowMeasurementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"FlowMeasurementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"FlowMeasurement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralCommissioningReadAttributeFabricIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralCommissioningReadAttributeFabricIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFabricIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralCommissioning FabricId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralCommissioningReadAttributeBreadcrumbWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralCommissioningReadAttributeBreadcrumbWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBreadcrumbWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralCommissioningWriteAttributeBreadcrumbWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"GeneralCommissioningWriteAttributeBreadcrumbWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    uint64_t value = 0x0000000000000000;
    [cluster writeAttributeBreadcrumbWithValue:value
                               responseHandler:^(NSError * err, NSDictionary * values) {
                                   NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err);
                                   XCTAssertEqual(err.code, 0);
                                   [expectation fulfill];
                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterGeneralCommissioningReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralCommissioningReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralCommissioning ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNetworkInterfacesWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralDiagnostics NetworkInterfaces Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralDiagnosticsReadAttributeRebootCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeRebootCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRebootCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralDiagnostics RebootCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GeneralDiagnostics ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGroupKeyManagementReadAttributeGroupsWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeGroupsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GroupKeyManagement Groups Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGroupKeyManagementReadAttributeGroupKeysWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupKeysWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeGroupKeysWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GroupKeyManagement GroupKeys Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGroupKeyManagementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"GroupKeyManagementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"GroupKeyManagement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGroupsReadAttributeNameSupportWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeNameSupportWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNameSupportWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Groups NameSupport Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterGroupsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Groups ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterIdentifyReadAttributeIdentifyTimeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeIdentifyTimeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeIdentifyTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Identify IdentifyTime Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterIdentifyWriteAttributeIdentifyTimeWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyWriteAttributeIdentifyTimeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0x0000;
    [cluster writeAttributeIdentifyTimeWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"Identify IdentifyTime Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterIdentifyReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Identify ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterKeypadInputReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"KeypadInputReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPKeypadInput * cluster = [[CHIPKeypadInput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"KeypadInput ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterLevelControlReadAttributeCurrentLevelWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeCurrentLevelWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"LevelControl CurrentLevel Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterLevelControlReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"LevelControlReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"LevelControl ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterLowPowerReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"LowPowerReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPLowPower * cluster = [[CHIPLowPower alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"LowPower ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterMediaInputReadAttributeMediaInputListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"MediaInputReadAttributeMediaInputListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPMediaInput * cluster = [[CHIPMediaInput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMediaInputListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"MediaInput MediaInputList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterMediaInputReadAttributeCurrentMediaInputWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"MediaInputReadAttributeCurrentMediaInputWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPMediaInput * cluster = [[CHIPMediaInput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentMediaInputWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"MediaInput CurrentMediaInput Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterMediaInputReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"MediaInputReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPMediaInput * cluster = [[CHIPMediaInput alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"MediaInput ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterMediaPlaybackReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"MediaPlaybackReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"MediaPlayback ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"NetworkCommissioningReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPNetworkCommissioning * cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"NetworkCommissioning ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OtaSoftwareUpdateProvider ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOccupancySensingReadAttributeOccupancyWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OccupancySensingReadAttributeOccupancyWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOccupancyWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OccupancySensing Occupancy Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOccupancySensingReadAttributeOccupancySensorTypeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OccupancySensingReadAttributeOccupancySensorTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOccupancySensorTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OccupancySensing OccupancySensorType Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOccupancySensingReadAttributeOccupancySensorTypeBitmapWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OccupancySensingReadAttributeOccupancySensorTypeBitmapWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOccupancySensorTypeBitmapWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OccupancySensing OccupancySensorTypeBitmap Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOccupancySensingReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OccupancySensingReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OccupancySensing ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffReadAttributeOnOffWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeOnOffWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff OnOff Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffReadAttributeGlobalSceneControlWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeGlobalSceneControlWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeGlobalSceneControlWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff GlobalSceneControl Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffReadAttributeOnTimeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeOnTimeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOnTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff OnTime Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffWriteAttributeOnTimeWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffWriteAttributeOnTimeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0;
    [cluster writeAttributeOnTimeWithValue:value
                           responseHandler:^(NSError * err, NSDictionary * values) {
                               NSLog(@"OnOff OnTime Error: %@", err);
                               XCTAssertEqual(err.code, 0);
                               [expectation fulfill];
                           }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterOnOffReadAttributeOffWaitTimeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeOffWaitTimeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOffWaitTimeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff OffWaitTime Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffWriteAttributeOffWaitTimeWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffWriteAttributeOffWaitTimeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint16_t value = 0;
    [cluster writeAttributeOffWaitTimeWithValue:value
                                responseHandler:^(NSError * err, NSDictionary * values) {
                                    NSLog(@"OnOff OffWaitTime Error: %@", err);
                                    XCTAssertEqual(err.code, 0);
                                    [expectation fulfill];
                                }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterOnOffReadAttributeStartUpOnOffWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeStartUpOnOffWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStartUpOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff StartUpOnOff Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffWriteAttributeStartUpOnOffWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffWriteAttributeStartUpOnOffWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0;
    [cluster writeAttributeStartUpOnOffWithValue:value
                                 responseHandler:^(NSError * err, NSDictionary * values) {
                                     NSLog(@"OnOff StartUpOnOff Error: %@", err);
                                     XCTAssertEqual(err.code, 0);
                                     [expectation fulfill];
                                 }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterOnOffReadAttributeFeatureMapWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeFeatureMapWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff FeatureMap Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOnOffReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OnOff ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOperationalCredentialsReadAttributeFabricsListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OperationalCredentialsReadAttributeFabricsListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFabricsListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OperationalCredentials FabricsList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterOperationalCredentialsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"OperationalCredentialsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"OperationalCredentials ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPressureMeasurementReadAttributeMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PressureMeasurementReadAttributeMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PressureMeasurement MeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPressureMeasurementReadAttributeMinMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PressureMeasurementReadAttributeMinMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PressureMeasurement MinMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPressureMeasurementReadAttributeMaxMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PressureMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PressureMeasurement MaxMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPressureMeasurementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PressureMeasurementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PressureMeasurement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeMaxPressureWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeMaxPressureWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxPressureWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl MaxPressure Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeMaxSpeedWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeMaxSpeedWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxSpeedWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl MaxSpeed Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeMaxFlowWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeMaxFlowWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxFlowWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl MaxFlow Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeEffectiveOperationModeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeEffectiveOperationModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEffectiveOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl EffectiveOperationMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeEffectiveControlModeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeEffectiveControlModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEffectiveControlModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl EffectiveControlMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeCapacityWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeCapacityWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCapacityWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl Capacity Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlReadAttributeOperationModeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeOperationModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl OperationMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterPumpConfigurationAndControlWriteAttributeOperationModeWithValue
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlWriteAttributeOperationModeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeOperationModeWithValue:value
                                  responseHandler:^(NSError * err, NSDictionary * values) {
                                      NSLog(@"PumpConfigurationAndControl OperationMode Error: %@", err);
                                      XCTAssertEqual(err.code, 0);
                                      [expectation fulfill];
                                  }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterPumpConfigurationAndControlReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"PumpConfigurationAndControl ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterRelativeHumidityMeasurementReadAttributeMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"RelativeHumidityMeasurementReadAttributeMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPRelativeHumidityMeasurement * cluster = [[CHIPRelativeHumidityMeasurement alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"RelativeHumidityMeasurement MeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterRelativeHumidityMeasurementReadAttributeMinMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"RelativeHumidityMeasurementReadAttributeMinMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPRelativeHumidityMeasurement * cluster = [[CHIPRelativeHumidityMeasurement alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"RelativeHumidityMeasurement MinMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterRelativeHumidityMeasurementReadAttributeMaxMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"RelativeHumidityMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPRelativeHumidityMeasurement * cluster = [[CHIPRelativeHumidityMeasurement alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"RelativeHumidityMeasurement MaxMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterRelativeHumidityMeasurementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"RelativeHumidityMeasurementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPRelativeHumidityMeasurement * cluster = [[CHIPRelativeHumidityMeasurement alloc] initWithDevice:device
                                                                                               endpoint:1
                                                                                                  queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"RelativeHumidityMeasurement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeSceneCountWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeSceneCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSceneCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes SceneCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeCurrentSceneWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeCurrentSceneWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentSceneWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes CurrentScene Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeCurrentGroupWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeCurrentGroupWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentGroupWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes CurrentGroup Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeSceneValidWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeSceneValidWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSceneValidWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes SceneValid Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeNameSupportWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeNameSupportWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNameSupportWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes NameSupport Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterScenesReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Scenes ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterSoftwareDiagnosticsReadAttributeCurrentHeapHighWatermarkWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"SoftwareDiagnosticsReadAttributeCurrentHeapHighWatermarkWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPSoftwareDiagnostics * cluster = [[CHIPSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentHeapHighWatermarkWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"SoftwareDiagnostics CurrentHeapHighWatermark Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterSoftwareDiagnosticsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"SoftwareDiagnosticsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPSoftwareDiagnostics * cluster = [[CHIPSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"SoftwareDiagnostics ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterSwitchReadAttributeNumberOfPositionsWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"SwitchReadAttributeNumberOfPositionsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPSwitch * cluster = [[CHIPSwitch alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNumberOfPositionsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Switch NumberOfPositions Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterSwitchReadAttributeCurrentPositionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"SwitchReadAttributeCurrentPositionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPSwitch * cluster = [[CHIPSwitch alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Switch CurrentPosition Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterSwitchReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"SwitchReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPSwitch * cluster = [[CHIPSwitch alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Switch ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTvChannelReadAttributeTvChannelListWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeTvChannelListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTvChannelListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TvChannel TvChannelList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTvChannelReadAttributeTvChannelLineupWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeTvChannelLineupWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTvChannelLineupWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TvChannel TvChannelLineup Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTvChannelReadAttributeCurrentTvChannelWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TvChannelReadAttributeCurrentTvChannelWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentTvChannelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TvChannel CurrentTvChannel Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTvChannelReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TvChannel ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TargetNavigatorReadAttributeTargetNavigatorListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTargetNavigator * cluster = [[CHIPTargetNavigator alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTargetNavigatorListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TargetNavigator TargetNavigatorList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTargetNavigatorReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TargetNavigatorReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTargetNavigator * cluster = [[CHIPTargetNavigator alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TargetNavigator ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTemperatureMeasurementReadAttributeMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TemperatureMeasurementReadAttributeMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TemperatureMeasurement MeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTemperatureMeasurementReadAttributeMinMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TemperatureMeasurementReadAttributeMinMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TemperatureMeasurement MinMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTemperatureMeasurementReadAttributeMaxMeasuredValueWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TemperatureMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TemperatureMeasurement MaxMeasuredValue Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterTemperatureMeasurementReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"TemperatureMeasurementReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"TemperatureMeasurement ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeLocalTemperatureWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeLocalTemperatureWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLocalTemperatureWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat LocalTemperature Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeOccupiedCoolingSetpointWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeOccupiedCoolingSetpointWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOccupiedCoolingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat OccupiedCoolingSetpoint Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatWriteAttributeOccupiedCoolingSetpointWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatWriteAttributeOccupiedCoolingSetpointWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int16_t value = 0;
    [cluster writeAttributeOccupiedCoolingSetpointWithValue:value
                                            responseHandler:^(NSError * err, NSDictionary * values) {
                                                NSLog(@"Thermostat OccupiedCoolingSetpoint Error: %@", err);
                                                XCTAssertEqual(err.code, 0);
                                                [expectation fulfill];
                                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterThermostatReadAttributeOccupiedHeatingSetpointWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeOccupiedHeatingSetpointWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOccupiedHeatingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat OccupiedHeatingSetpoint Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatWriteAttributeOccupiedHeatingSetpointWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatWriteAttributeOccupiedHeatingSetpointWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    int16_t value = 0;
    [cluster writeAttributeOccupiedHeatingSetpointWithValue:value
                                            responseHandler:^(NSError * err, NSDictionary * values) {
                                                NSLog(@"Thermostat OccupiedHeatingSetpoint Error: %@", err);
                                                XCTAssertEqual(err.code, 0);
                                                [expectation fulfill];
                                            }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterThermostatReadAttributeControlSequenceOfOperationWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeControlSequenceOfOperationWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeControlSequenceOfOperationWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat ControlSequenceOfOperation Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatWriteAttributeControlSequenceOfOperationWithValue
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatWriteAttributeControlSequenceOfOperationWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeControlSequenceOfOperationWithValue:value
                                               responseHandler:^(NSError * err, NSDictionary * values) {
                                                   NSLog(@"Thermostat ControlSequenceOfOperation Error: %@", err);
                                                   XCTAssertEqual(err.code, 0);
                                                   [expectation fulfill];
                                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterThermostatReadAttributeSystemModeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatReadAttributeSystemModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSystemModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat SystemMode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatWriteAttributeSystemModeWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatWriteAttributeSystemModeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeSystemModeWithValue:value
                               responseHandler:^(NSError * err, NSDictionary * values) {
                                   NSLog(@"Thermostat SystemMode Error: %@", err);
                                   XCTAssertEqual(err.code, 0);
                                   [expectation fulfill];
                               }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterThermostatReadAttributeStartOfWeekWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatReadAttributeStartOfWeekWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStartOfWeekWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat StartOfWeek Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeNumberOfWeeklyTransitionsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeNumberOfWeeklyTransitionsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNumberOfWeeklyTransitionsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat NumberOfWeeklyTransitions Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeNumberOfDailyTransitionsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeNumberOfDailyTransitionsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNumberOfDailyTransitionsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat NumberOfDailyTransitions Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeFeatureMapWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"ThermostatReadAttributeFeatureMapWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat FeatureMap Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThermostatReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThermostatReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThermostat * cluster = [[CHIPThermostat alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"Thermostat ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeChannelWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeChannelWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeChannelWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics Channel Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRoutingRoleWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRoutingRoleWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRoutingRoleWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RoutingRole Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeNetworkNameWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeNetworkNameWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNetworkNameWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics NetworkName Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributePanIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributePanIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePanIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics PanId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeExtendedPanIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeExtendedPanIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeExtendedPanIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ExtendedPanId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeMeshLocalPrefixWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeMeshLocalPrefixWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeMeshLocalPrefixWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics MeshLocalPrefix Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOverrunCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics OverrunCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeNeighborTableListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeNeighborTableListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeNeighborTableListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics NeighborTableList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRouteTableListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRouteTableListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRouteTableListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RouteTableList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributePartitionIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributePartitionIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePartitionIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics PartitionId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeWeightingWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeWeightingWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeWeightingWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics Weighting Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeDataVersionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeDataVersionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeDataVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics DataVersion Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeStableDataVersionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeStableDataVersionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeStableDataVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics StableDataVersion Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeLeaderRouterIdWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeLeaderRouterIdWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLeaderRouterIdWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics LeaderRouterId Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeDetachedRoleCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeDetachedRoleCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeDetachedRoleCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics DetachedRoleCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeChildRoleCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeChildRoleCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeChildRoleCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ChildRoleCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRouterRoleCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRouterRoleCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRouterRoleCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RouterRoleCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeLeaderRoleCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeLeaderRoleCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeLeaderRoleCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics LeaderRoleCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeAttachAttemptCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeAttachAttemptCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeAttachAttemptCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics AttachAttemptCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributePartitionIdChangeCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributePartitionIdChangeCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributePartitionIdChangeCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics PartitionIdChangeCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeBetterPartitionAttachAttemptCountWithResponseHandler
{
    XCTestExpectation * expectation = [self
        expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeBetterPartitionAttachAttemptCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBetterPartitionAttachAttemptCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeParentChangeCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeParentChangeCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeParentChangeCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ParentChangeCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxTotalCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxTotalCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxTotalCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxTotalCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxUnicastCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxUnicastCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxUnicastCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxUnicastCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxBroadcastCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxBroadcastCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxBroadcastCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxBroadcastCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxAckRequestedCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxAckRequestedCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxAckRequestedCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxAckRequestedCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxAckedCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxAckedCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxAckedCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxAckedCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxNoAckRequestedCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxNoAckRequestedCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxNoAckRequestedCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxNoAckRequestedCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxDataCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxDataCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxDataCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxDataCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxDataPollCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxDataPollCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxDataPollCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxDataPollCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxBeaconCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxBeaconCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxBeaconCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxBeaconCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxBeaconRequestCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxBeaconRequestCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxBeaconRequestCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxBeaconRequestCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxOtherCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxOtherCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxOtherCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxOtherCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxRetryCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxRetryCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxRetryCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxRetryCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxDirectMaxRetryExpiryCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxDirectMaxRetryExpiryCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxDirectMaxRetryExpiryCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxIndirectMaxRetryExpiryCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxIndirectMaxRetryExpiryCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxIndirectMaxRetryExpiryCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxErrCcaCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxErrCcaCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxErrCcaCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxErrCcaCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxErrAbortCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxErrAbortCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxErrAbortCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxErrAbortCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeTxErrBusyChannelCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeTxErrBusyChannelCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTxErrBusyChannelCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics TxErrBusyChannelCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxTotalCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxTotalCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxTotalCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxTotalCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxUnicastCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxUnicastCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxUnicastCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxUnicastCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxBroadcastCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxBroadcastCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxBroadcastCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxBroadcastCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxDataCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxDataCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxDataCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxDataCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxDataPollCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxDataPollCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxDataPollCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxDataPollCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxBeaconCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxBeaconCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxBeaconCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxBeaconCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxBeaconRequestCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxBeaconRequestCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxBeaconRequestCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxBeaconRequestCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxOtherCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxOtherCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxOtherCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxOtherCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxAddressFilteredCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxAddressFilteredCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxAddressFilteredCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxAddressFilteredCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxDestAddrFilteredCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxDestAddrFilteredCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxDestAddrFilteredCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxDestAddrFilteredCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxDuplicatedCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxDuplicatedCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxDuplicatedCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxDuplicatedCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrNoFrameCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrNoFrameCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrNoFrameCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrNoFrameCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrUnknownNeighborCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrUnknownNeighborCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrUnknownNeighborCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrUnknownNeighborCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrInvalidSrcAddrCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrInvalidSrcAddrCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrInvalidSrcAddrCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrSecCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrSecCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrSecCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrSecCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrFcsCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrFcsCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrFcsCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrFcsCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeRxErrOtherCountWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeRxErrOtherCountWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRxErrOtherCountWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics RxErrOtherCount Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeSecurityPolicyWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeSecurityPolicyWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSecurityPolicyWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics SecurityPolicy Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeChannelMaskWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeChannelMaskWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeChannelMaskWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ChannelMask Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeOperationalDatasetComponentsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeOperationalDatasetComponentsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOperationalDatasetComponentsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics OperationalDatasetComponents Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeActiveNetworkFaultsListWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeActiveNetworkFaultsListWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeActiveNetworkFaultsListWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ActiveNetworkFaultsList Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"ThreadNetworkDiagnostics ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWakeOnLanReadAttributeWakeOnLanMacAddressWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WakeOnLanReadAttributeWakeOnLanMacAddressWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWakeOnLan * cluster = [[CHIPWakeOnLan alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeWakeOnLanMacAddressWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WakeOnLan WakeOnLanMacAddress Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWakeOnLanReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"WakeOnLanReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWakeOnLan * cluster = [[CHIPWakeOnLan alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WakeOnLan ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeBssidWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeBssidWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeBssidWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics Bssid Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeSecurityTypeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeSecurityTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSecurityTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics SecurityType Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeWiFiVersionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeWiFiVersionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeWiFiVersionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics WiFiVersion Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeChannelNumberWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeChannelNumberWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeChannelNumberWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics ChannelNumber Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeRssiWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeRssiWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeRssiWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics Rssi Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WiFiNetworkDiagnostics ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeTypeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"WindowCoveringReadAttributeTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering Type Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionLiftWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionLiftWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionLiftWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionLift Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionTiltWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionTiltWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionTiltWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionTilt Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeConfigStatusWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeConfigStatusWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeConfigStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering ConfigStatus Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionLiftPercentageWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionLiftPercentageWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionLiftPercentageWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionLiftPercentage Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionTiltPercentageWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionTiltPercentageWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionTiltPercentageWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionTiltPercentage Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeOperationalStatusWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeOperationalStatusWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeOperationalStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering OperationalStatus Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeTargetPositionLiftPercent100thsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeTargetPositionLiftPercent100thsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTargetPositionLiftPercent100thsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering TargetPositionLiftPercent100ths Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeTargetPositionTiltPercent100thsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeTargetPositionTiltPercent100thsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeTargetPositionTiltPercent100thsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering TargetPositionTiltPercent100ths Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeEndProductTypeWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeEndProductTypeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeEndProductTypeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering EndProductType Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionLiftPercent100thsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionLiftPercent100thsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionLiftPercent100thsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionLiftPercent100ths Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeCurrentPositionTiltPercent100thsWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeCurrentPositionTiltPercent100thsWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeCurrentPositionTiltPercent100thsWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering CurrentPositionTiltPercent100ths Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeInstalledOpenLimitLiftWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeInstalledOpenLimitLiftWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInstalledOpenLimitLiftWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering InstalledOpenLimitLift Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeInstalledClosedLimitLiftWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeInstalledClosedLimitLiftWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInstalledClosedLimitLiftWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering InstalledClosedLimitLift Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeInstalledOpenLimitTiltWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeInstalledOpenLimitTiltWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInstalledOpenLimitTiltWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering InstalledOpenLimitTilt Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeInstalledClosedLimitTiltWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeInstalledClosedLimitTiltWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeInstalledClosedLimitTiltWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering InstalledClosedLimitTilt Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeModeWithResponseHandler
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"WindowCoveringReadAttributeModeWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeModeWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering Mode Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringWriteAttributeModeWithValue
{
    XCTestExpectation * expectation = [self expectationWithDescription:@"WindowCoveringWriteAttributeModeWithValue"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    uint8_t value = 0x00;
    [cluster writeAttributeModeWithValue:value
                         responseHandler:^(NSError * err, NSDictionary * values) {
                             NSLog(@"WindowCovering Mode Error: %@", err);
                             XCTAssertEqual(err.code, 0);
                             [expectation fulfill];
                         }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
- (void)testSendClusterWindowCoveringReadAttributeSafetyStatusWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeSafetyStatusWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeSafetyStatusWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering SafetyStatus Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

- (void)testSendClusterWindowCoveringReadAttributeClusterRevisionWithResponseHandler
{
    XCTestExpectation * expectation =
        [self expectationWithDescription:@"WindowCoveringReadAttributeClusterRevisionWithResponseHandler"];

    CHIPDevice * device = GetPairedDevice(kDeviceId);
    dispatch_queue_t queue = dispatch_get_main_queue();
    CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue];
    XCTAssertNotNil(cluster);

    [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) {
        NSLog(@"WindowCovering ClusterRevision Error: %@", err);
        XCTAssertEqual(err.code, 0);
        [expectation fulfill];
    }];

    [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}

@end
